﻿{% extends "gma/base.html" %}
{% load static %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-chart-pie weui_grid_icon_fa" style="font-size: 32px"> </i> 渠道统计
    </h1>
</div>

<div class="page__bd">
    {% for app, channels in data %}
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd"> <i class="fab fa-app-store-ios"></i> {{ app.name }} </div>
        <div class="weui-panel__bd">
            <div class="weui-grids">
                {% for channel in channels %}
                     <a href="{% url 'gma:channel_home' channel.code app.code %}" class="weui-grid">
                        <div class="weui-grid__icon2"> <img src="{{ channel.icon }}"/> </div>
                        <p class="weui-grid__label"> {{ channel.name }} </p>
                        <p class="weui-grid__label2">
                            {% if channel.pay_amount > 0 %}
                                <span><i class="fa fa-yen-sign"> </i> {{ channel.pay_amount|default:0 }}, </span>
                            {% else %}
                                <span class="gray_color"><i class="fa fa-yen-sign"> </i> {{ channel.pay_amount|default:0 }}, </span>
                            {% endif %}

                            {% if channel.new_user_count > 0 %}
                                <span><i class="fa fa-user-plus"></i> {{ channel.new_user_count|default:0 }} </span>
                            {% else %}
                                <span class="gray_color"><i class="fa fa-user-plus"></i> {{ channel.new_user_count|default:0 }} </span>
                            {% endif %}
                        </p>
                     </a>
                {% endfor %}
            </div>
        </div>

        <div class="weui-panel__ft">
            <a href="javascript:void(0);" class="weui-cell weui-cell_access weui-cell_link">
                <div class="weui-cell__bd">查看更多</div>
                <span class="weui-cell__ft"></span>
            </a>
        </div>
    </div>
    {% endfor %}
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}
